$(function() {	

var hCardValidater ={

	validate:function(){
		var familyName = $("#familyName");
		if (!familyName.val()) {
			alert(ccm_t("familyName"));
			return false;
		}
 
		var givenName = $("#givenName");
		if (!givenName.val()) {
			alert(ccm_t("givenName"));
			return false;
		}

		var url = $("#url");
		if (!url.val()) {
			alert(ccm_t("url"));
			return false;
		} else if (!/^(((ht|f)tp(s?))\:\/\/)([0-9a-zA-Z\-]+\.)+[a-zA-Z]{2,6}(\:[0-9]+)?(\/\S*)?$/.test(url.val())) {
			alert(ccm_t("urlValid"));
			return false;
		}
		
		var email = $("#email");
		if (!email.val()) {
			alert(ccm_t("email"));
			return false;
		} else if (!/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/.test(email.val())) {
			alert(ccm_t("emailValid"));
			return false;
		}

		return true;
	}
}

ccmValidateBlockForm = function() { return hCardValidater.validate(); }